Time-in-store estimation using facial recognition

ABSTRACT

A method of monitoring the amount of time spent in a specified area by an individual comprises employing a first camera to automatically create one or more entrance images, each entrance image containing a face of an entering individual that passes a first location, and storing each entrance image in a database along with a corresponding entrance time that the entering individual passed the entrance location. A second camera is also employed to automatically create an exit image of a face of an exiting individual that passes a second location, and the exit image is recorded along with the corresponding exit time that the exiting individual passed the exit location. The exit image is then compared to the entrance images in the database to identify a matching entrance image containing the same face as the exit image. A stay time is then determined for the exiting individual by determining the difference between the entrance time corresponding to the matching entrance image and the exit time.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority of U.S. Provisional PatentApplication Nos. 61/736,437, filed on Dec. 12, 2012, the contents ofwhich is hereby incorporated herein by reference in its entirety.

FIELD

The present disclosure relates to a method and system for determiningand analyzing flow patterns of individuals in a specified area, and morespecifically to systems and methods of determining and analyzing amountsof time spent in a specified area by individuals, such as time spent bycustomers in a store.

BACKGROUND

Facial detection and facial recognition algorithms exist and areavailable on the market. Currently, these algorithms (especially facialrecognition algorithms) still face accuracy challenges when applied incertain settings and configurations. For example, facial detection andrecognition algorithms tend to be highly inaccurate at identifying andrecognizing facial profiles, or even facial images that are directedmore than 20° away from the image source. Additionally, facial detectionand recognition algorithms tend to have difficulty accurately detectingand recognizing faces in poor lighting or when objects partially coverthe subject's face, such as for subjects wearing sunglasses and/orhaving long hair. Facial recognition algorithms also tend to miss ormisidentify certain facial features in an image, thus making itdifficult to accurately compare and match two different facial images.For example, recognition is sensitive to temporal changes that anindividual may have, such as changing a hair style or growing a beard.Recognition is also sensitive to the amount of possible matches in adatabase, which may increase the possibility of a mismatch.

SUMMARY

The present disclosure stems from the inventors research and developmentof systems and methods for employing facial recognition and facialdetection algorithms for determining the amount of time that anindividual, such as a customer, spends in a particular location, such asinside a store. In addition to measuring a customer's stay time in alocation, such as a time-in-store, the method and systems developed bythe inventors and disclosed herein can be applied to any situationrequiring the measurement and flow monitoring of the amount of time thatone or more individuals spend in a specified area. For example, thedisclosed stay time monitoring system may be used to monitor and analyzethe amount of time that individuals spend in a particular section of astore, such as how long individuals spend in the checkout line. Thedisclosed methods and systems also relate to analyzing data relating tosuch time spent in a specified area to provide useful analytic resultsfor a user. For example, the present inventors recognize that measuringand analyzing the amount of time that customers spend in a particularstore can provide value in at least two major respects: 1) time-in-storedata can be correlated to sales data to provide information about how toincrease sales; and 2) measuring a customer's time-in-store leads tobetter predictions of customers' flow and can allow a store to betterservice a customer leading to higher customer satisfaction.

The present inventors recognize that facial detection and recognitionalgorithms could be used, despite their lack of reliability, to createuseful data regarding amounts of time spent by individuals in aspecified area, such as time-in-store data. For example, the inventorsrecognize that with a large statistical pool garnered by a large trafficflow through a particular area, significant and useful data can begarnered even if a stay time, e.g., a time-in-store, can only beidentified for a relatively small percentage of individuals passingthrough the specified area. In other words, even if only a fraction offacial matches can be determined between images taken at an entrancelocation and images taken at an exit location, that detected fractioncan be representative of the larger flow pattern and the amount of timespent in the specified area by individuals. Since the unmatched imagesare essentially random with respect to the amount of time spent in thestore, the detected percentage can serve as a representative sample tothe amount of time spent in the specified area, such as a store, by thelarger population.

In one embodiment, a method of monitoring the amount of time spent in aspecified area by an individual includes receiving a plurality entranceimages, each entrance image containing a face of an entering individualthat passes a first location, and then storing each entrance image inthe database along with a corresponding entrance image time that theentering individuals pass the entrance locations. An exit image is alsoreceived of a face of an exiting individual that passes a secondlocation, and the exit image is stored along with the corresponding exittime that the exiting individual passed the exit location. The methodfurther comprises comparing the exit image to the entrance images in thedatabase and identifying a matching entrance image containing the sameface as the exit image. A stay time is then determined for the exitingindividual by determining the difference between the entrance timecorresponding to the matching entrance image and the exit time.

A system for monitoring time spent in a location by an individualincludes a first camera positioned to record images of individualspassing a first location and a first image processing module configuredto process the recorded images from the first camera using a facedetection algorithm to detect faces within the recorded image, create anentrance image of each detected face, and determine an entrance time foreach entrance image. The entrance time is the time that the individualsin the entrance image pass the first location. A database is configuredto receive and store the entrance image and the corresponding entrancetime. The system also includes a second camera positioned to recordindividuals passing a second location and a second image processingmodule configured to process the recorded images from the second camerausing a face detection algorithm to detect faces within the recordedimage, create an exit image of each detected face, and determine an exittime for each exit image. The exit time is the time that the individualin the exit image passes the second location. An image matching moduleis configured to compare the exit image to the entrance images in thedatabase of entrance images using a facial recognition algorithm toidentify a matching entrance image containing the same face as the exitimage, and a stay time calculator module configured to calculate thestay time for the exiting individual by determining the differencebetween entrance time corresponding to the matching entrance image andthe exit time.

In an exemplary embodiment, a system for monitoring time spent in alocation may be utilized in a store, wherein the first camera ispositioned to record individuals entering the store and a second camerais positioned to record individuals exiting the store. In such anembodiment, the stay time for the exiting individual is the time thatthe exiting individual spent in the store.

In another embodiment, a method of monitoring a time-in-store for anindividual comprises recording an image of an entrance location with afirst camera and recording an entrance time associated with an image ofthe entrance location. One or more faces in an image of the entrancelocation are detected using a first detection algorithm, and an entranceimage is created of the one or more faces detected in the image of theentrance location. The entrance image and the entrance time are thenstored together in an entrance image database. The method furtherincludes recording an image of an exit location with a second camera andrecording an exit time associated with the image of the exit location.One or more faces are detected in the image of the exit location usingthe face detection algorithm, and an exit image is created of the one ormore faces detected in the image of the exit location. The exit image isthen stored along with the exit time. The method further includescomparing the exit image to the images in the entrance image databaseusing a facial recognition algorithm and detecting a matching entranceimage, wherein the matching entrance image contains a facial match tothe exit image. The stay time is then calculated by determining thedifference between exit time and the entrance time associated with thematching entrance image. The system may further includes identifying thematched entrance images in the entrance image database and removingunmatched entrance images from the entrance image database that haveentrance times before a predefined time period. The method may furthercomprise calculating stay times for multiple exit images over apredefined time period and averaging the stay times within thepredefined time period to create an average stay time for the predefinedtime period.

Various other features, objects and advantages of the invention will bemade apparent from the following description taken together with thedrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an exemplary system diagram depicting one embodiment of a staytime monitoring system.

FIG. 2 is another exemplary system diagram depicting an embodiment of astay time monitoring system.

FIG. 3 is a flow diagram depicting an embodiment of a method formonitoring time spent in a specified location.

FIG. 4 is an exemplary embodiment of an analytics output of a method andsystem for monitoring stay time.

DETAILED DISCLOSURE

In one example depicted in FIG. 1, a stay time monitoring system 1includes the first camera 4 imaging an entrance location 14 and a secondcamera 6 imaging an exit location 16. The first camera 4 and the secondcamera 6 are preferably video cameras; however, a still image camera mayalso be used. In a preferred embodiment, the first and second cameras 4and 6 are mounted approximately in the same horizontal plane as thefaces of individuals passing the first location and/or the secondlocation. However, systems 1 having higher or lower mounted cameras arealso possible. The images are then time stamped and stored. Preferably,the first and second cameras 4 and 6 also time stamp each captured imageor frame with the time of capture, and store such time stamp dataembedded in or in association with the image. Alternatively, the imagesmay be time stamped upon storage. In such an embodiment, the storageprocess must take place reasonably quickly after the image is capturedby the camera so that the time stamp is accurate enough for the timemeasurement purposes disclosed herein.

The exemplary system in FIG. 1 further comprises a local processor 9which processes image data from the cameras 4 and 6 and then transfersthe image data to a central processor 10 for facial detection andrecognition processing. At the local processor, the images from eachcamera may be processed to determine whether any change or motion isdetected, which would indicate that the image from the respective cameramay contain an image of one or more individuals entering or exiting thestore 2. If change or motion is detected in the image from the firstcamera 4, then the image capture module 50 captures the image, includingthe time stamp data, for example by placing the image in a storagelocation, such as a database, and/or transmitting the image to thecentral processor 10. Likewise, if the change/motion detector module 51detects any change or motion in the image from the second camera 6, thenthe image capture module 52 captures the image. In the depictedembodiment, the captured images, along with any associated time-stampdata, may be transferred to a central processor 10 for face detectionand further processing.

In the embodiment of FIG. 1, the central processor 10 employs a facedetector module 19 to process the images captured from the first camera4 and the second camera 6. Images wherein one or more faces are detectedare then transferred to a face recognizer 55, which is a facerecognition algorithm or module. The face recognizer module 55 includesa facial feature extractor 60 and a face matcher 40 algorithm. Thefacial feature extractor 60 operates facial recognition software oralgorithms to determine a facial feature descriptor for the detectedface. For example, facial feature descriptors may be a vector of numbersidentifying and describing facial landmarks—such as ears, eyes, pupils,mouth, nose, cheekbones, and jaw—and their relative location, position,size, and/or shape of each landmark on the subject's face. Any number ofavailable facial identification, facial feature extraction, and/orfacial recognition software products may be utilized in the stay timemonitoring system 2 and the disclosed method. For example, severalsuitable algorithms are available on the market, including the FaceVACS™software by Cognitec Systems GmbH, FaceSDK offered by Luxand, Inc., andFaceRecognizer by OpenCV.

The central processor 10 may be at a remote location, such as a centraloffice or headquarters. Alternatively, the central processor 10 may behoused locally within the store 2, and may even be the same processor asthe local processor 9. In embodiments where the central processor 10 isseparate from the local processor 9, the processing tasks describedherein can be divided up between the processors in any fashion—i.e., theseparation between local and remote processing can be done between anyalgorithm processing stage. For example, in the embodiment depicted inFIG. 1, the division may be between change detector 51/49 and facedetector 19, or between face detector 19 and face recognizer 55, betweenthe facial feature extractor 60 and the face matcher 40, between thefacial recognizer 55 and the stay time calculator 57, or between thestay time calculator 57 and the storage in the stay time database 58.

In the exemplary system depicted in FIG. 1, after the image has beenprocessed by the face recognition module 55, the image and/or theresulting facial feature descriptor for the detected face are stored ineither the exit image storage 54 or the entrance image database 53,depending on the source of the image. Images from the first camera 4wherein faces are detected at module 19 and recognized at module 55 aretransferred to the entrance image database 53. The entrance imagedatabase may index and store the image, including the time stamp data,and/or facial feature descriptor data in any number of ways. Forexample, the database may process and store in association with a uniqueindex any or all of the following information: the image from the firstcamera 4, the time stamp data associated with the image, the dataregarding all of the faces detected in that image, a thumbnail or cutoutimage of one particular identified face (which may or may not include adefined area surrounding the detected face, depicting the body, hair,and clothing of the individual having the detected face), and any dataresulting from the facial feature extractor 60. Alternatively, theentrance image database 53 and/or the exit image storage 54 may store inassociation with a unique index just the facial feature descriptor andthe time stamp data associated with the image from the first camera 4.

Images from the second camera 6 wherein faces are detected at module 19and recognized at module 55 are transferred to the exit image storage54. In another embodiment, the exit image storage 54 is the same storagedatabase as the entrance image database 53. Ian such an embodiment, eachimage stored in the database may be tagged as either an entrance imageor an exit image. The exit image storage may be a temporary storage, ora database similar to the entrance image database. Like the descriptionabove regarding the entrance image, the exit image can take any form,and it can be any combination of the image from the second camera 6 andthe data developed by the face detector 19 and the face recognitionmodule 55.

After each exit image is stored at 54, the face matching module 40compares the exit image 54, or associated facial feature descriptor, tothe images, or associated facial feature descriptors, in the entrancedatabase 53. The objective of the face matching module 40 is to detectan entrance image in an entrance image database 53 that contains theface as that in the exit image. The face matching module may employ anynumber of facial matching methods and/or techniques for identifying amatch between the exit image and any image in the entrance imagedatabase 53. In one embodiment, a match is determined when a sufficientcommonality between the facial feature descriptor of the exit image andthe facial feature descriptor for the entrance image. For example,sufficient commonality may be where the exit image and entrance imagehave at least a predefined number of facial feature descriptors incommon, i.e., the images have a high visual resemblance. As facialrecognition algorithms tend to be unreliable in identifying andrecognizing faces, facial matching may be a matter of determining aprobabilistic match. In other words, the face matching algorithm mayconsider two images to be a match if they have the highest commonalityof any pair in the data set and the commonality is sufficient toindicate that the images are more likely to contain the same face thanto contain different faces.

Once a match is determined between the exit image and the entranceimage, the stay time calculator 57 calculates the stay time between whenthe entrance image was taken and when the exit image was taken. Forexample, the stay time may be calculated as the difference between thetime stamp on the image captured from the first camera 4 and the timestamp on the image captured by the second camera 6. Once the stay timeis determined at module 57, it is stored in the stay time database 58.The stay time database 58 may store only the entrance and exit timestamps, or it may store any amount of data associated with the entranceand exit images and/or the stay time. In one embodiment, the stay timedatabase 58 is combined in a single database with the entrance imagedatabase 53 and/or the exit image storage 54. In such an embodiment, thesingle database acts as the repository for the entrance and exit images,which may include the facial detection and recognition data, along withthe stay time data.

The change/motion detector algorithms 49 and 51 may employ any number ofimage processing methods to detect a change or motion with an image,such as a person entering the entrance area 14 or the exit area 16. Forexample, the change/motion detector modules 49 and 51 may each have animage of the location to which they are associated in its vacant, orempty state. For example, the change/motion detector 49 associate withthe first camera 4 may have a template image of the entrance location 14without any people, traffic, or transient foreign objects therein. Thattemplate image can be compared to every subsequent image, or frame, fromthe first camera 4 to determine whether a change has taken place whichmight indicate that a subject has entered the entrance area 14.Alternatively, each entrance image, or frame, taken by the first camera4 can be compared to a subsequent, or later, image to determine whethera change has taken place or is in progress. In still other embodiments,the change/motion detector 49 and/or 51 may employ a physical motionsensor associated with the first and/or second cameras 4 and 6. In suchan embodiment, the change/motion detector modules 49 and 51 wouldreceive input from the motion sensor, and if motion was detected wouldsend the image to the image capture module 50. Similarly, a detectorcould be mounted in association with a door at an entrance or exitlocation, and the associated camera could be programmed to image thecorresponding entrance or exit location upon detecting the door opening.

The change/motion detectors 49 and 51 associated with each of the firstcamera 4 and the second camera 6 may be two separate modules, one foreach camera. In such an embodiment, each camera may have a separateprocessor attached thereto to process the images captured by the camera.In an alternative embodiment, the cameras 4 and 6 may both be attachedto a single processor, such as the local processor 9. In such anembodiment, the change/motion detectors 49 and 51 may be a single modulethat detects change or motion in the images of both cameras 4 and 6.

In another embodiment not specifically depicted in FIG. 1, the stay timemonitoring system 1 does not have a change or motion detector module,and each image or frame from the first camera 4 and the second camera 6is processed by a face detector algorithm, such as by detector module19, to determine whether face is captured in the image. In such anembodiment, the camera could be programmed to angle towards and/or zoomin on the detected face so that a maximum quality image may be taken. Inyet another alternative embodiment, each image or frame from the firstcamera 4 and the second camera 6 is processed with a person detectoralgorithm to detect the presence of a person in the image. Then, if aperson is detected, the image may be further processed to detect, orisolate, the head of the person. Person detector algorithms are commonlyused in a variety of applications. Once a person is detected, thedetected person can be used to create a trajectory. Trajectories formultiple people can be used to count people entering a pre-definedregion, to measure the amount of time people spend in pre-definedregion, or for other applications, including but not limited tointrusion detection, traffic counts (for conversion rates), customer'swaiting time\dwell time, and loitering detection. Many ways of detectingpeople in images are known in the art, and any such person detectoralgorithm may be suitable for use in such an embodiment of the method.

In such an embodiment, an entrance image or exit image, as appropriate,may be created to isolate the detected person, or even just the headportion of the image. Alternatively, the entrance or exit image may bethe entire image captured by the first or second camera 4 or 6. Thatentrance or exit image may then be processed with a face detector module19 to verify the presence of a face. Alternatively, the face detectormodule 19 could be integrated into the facial recognition module 55, andeach of the entrance image and the exit image may be processed with thatcombined module. In still other embodiments, the images captured by thefirst and/or second cameras 4 and 6 can be processed directly by theface detector module 19 to continually search the images for faces. Asface detection algorithms are typically data and processor intensive,such an embodiment may require substantial processing power.

The face detection module 19 may employ any algorithm to detect a humanface. For example, the face detection module may employ color detectionmethods to detect regions which are likely to contain human skin andthen focus on those regions to identify particular facial features. Inone such exemplary embodiment, a skin color probability image may begenerated by doing a color analysis, and the probability image thenprocessed by performing principal components analysis thereon. In stillother embodiments, images are processed by neural networks usingmulti-dimensional information to detect any number of qualities of animage, such as skin color and/or facial features. In one suchembodiment, a model-based approach is used to match images to model faceshapes and/or facial features. In still other embodiments, anycombination of color and/or pattern detection may be employed to detectthe face or head region of an individual in the image.

The face recognition module 55 may employ any facial recognitionalgorithm or technique to determine a facial feature descriptor for adetected face. For example, common facial recognition algorithms includePrincipal Component Analysis using eigenfaces, Linear DiscriminateAnalysis, Elastic Bunch Graph Matching using the Fischerface algorithm,the Hidden Markov model, the Multilinear Subspace Learning using tensorrepresentation, and the neuronal motivated dynamic link matchingalgorithms. Alternatively or additionally, 3-dimensional facerecognition may be employed. Such an embodiment may require specialcameras equipped with 3-D sensors to capture, or image, 3-dimensionalinformation about the imaged space—e.g. the entrance area 14 or exitarea 16. This 3-D information may be utilized by the facial recognitionalgorithm to identify distinctive features on the surface of the face,such as the contour of the eye sockets, nose, and/or chin.

In some embodiments, the facial recognition algorithm used in module 55may identify other features aside from facial features, such as haircolor, hair shape, or length, clothing colors or designs. Suchdescriptors may be part of the facial feature descriptor stored as partof the entrance image or exit image. In such an embodiment, theadditional feature description can aid in making a match between an exitimage and an entrance image. In a preferred embodiment, the facialfeature descriptor includes descriptions of features that areindependent of camera distance and image size, and are relativelyunsusceptible to image angle and small changes in lighting. Moreover,preferred descriptors are those that are less likely to change betweenthe time that the entrance image is taken and the exit image is taken.For example, hair color is a useful feature descriptor that is oftenincluded in facial feature descriptors because it likely remainsconstant over the relevant period of time, is easily detected frommultiple camera angles, and is typically identifiable despite moderatelighting changes. Another descriptor often included in a facial featuredescriptor for an image is clothing color.

In the embodiment depicted in FIG. 1, the stay time monitoring system 1employs a central processor 10 with a separate face detector module 19and facial recognition module 55. In such an embodiment, the facedetector module 19 may employ face detection soft are from a differentsource than the software employed by the face recognition module 55. Inother embodiments, however, the face detector module 19 and the facerecognition module 55 may be a combined detector/recognition module thatboth detects the presence of a face and determines facial featuresdescriptors for the face. In such an embodiment, the single facedetector/recognition module likely employs software from a singlesource, or vendor. As previously described, the face detection and/orface recognition modules 19 and 55 may be utilized to continuallyprocess the images from the first and second cameras 4 and 6, therebyobviating the need for any preprocessing modules, such as thechange/motion detector modules 49 and 55. Alternatively, the facedetector module 19 and/or the face recognition module 55 may be employedin response to a triggering event or quality detected in the images fromthe first and/or second cameras. For example, as depicted in FIG. 1 anddescribed above, the face detector module 19 and face recognizer module55 may be employed after a change is detected in the image from thefirst camera 4 or the second camera 6, or when motion is detected by amotion sensor.

The face detector module 19 and the face recognition module 55 may beemployed by a processor dedicated to a stay time monitoring system 1 fora single store 2. In such an embodiment, the central processor 10 may beassociated with or located in the store 2. In another embodiment, thecentral processor 10 may be housed remotely, for example, on the cloudand all processing may take place online. Alternatively, the centralprocessor 10 may be housed in a central office associated with multiplestores 2, and thus may receive image data from multiple entrance cameras4 and exit cameras 6 associated with the multiple stores. If the staytime monitoring system 1 utilizes a third party face detection and/orface recognition software, centralizing the face detection and facerecognition processes to the central processor can reduce the number oflicenses needed with such software. In other words, rather than havingto license the software to be used at multiple store locations, alicense can be obtained for one, centralized location. Additionally,where applicable, such a centralized embodiment may have the addedbenefit of being able to perform analytics involving stay time data frommultiple store locations 2. However, such benefit may also be realizedin a system with a local processor by uploading or centralizing the staytime data and/or the analytics data from the individual stores into acentralized database.

The system configuration depicted in FIG. 1 is merely an exemplaryembodiment of the time monitoring system, and the system could take onnumerous different configurations and still be within the scope of theinvention conceived of by the inventors. For example, multiple camerasmay be employed at each of the entrance location and the exit location,and the output from the cameras processed by a local processor 9 and/ordirectly by a central processor 10. In such an embodiment, the camerasmay be centrally networked and controlled such that they act in concertto monitor an area without creating redundancies. Likewise, if an areahas multiple entrance and exit locations, a camera or cameras may beemployed at each entrance and exit location. In another embodiment,output from the first camera 4 and the second camera 6, and any numberof other cameras, may be directed to a central processor such that allimage processing happens in a remote location to which the data istransferred via an internet connection or by other means. The centralprocessor may be, for example, at a central headquarters for aparticular company or at a data processing center, and image data frommultiple store locations could be processed at that central processorlocation. Alternatively, in a different embodiment, a store 2, which maybe each store location in a chain or an individual store, could have itsown processor to process all image data and perform all analyticslocally in each store. Likewise, other configurations which are known inthe art are equally possible.

FIG. 2 is a system diagram of an exemplary embodiment of a stay timemonitoring system 1 implementing a face detection module 19, a facerecognition module 55, and a face matching module 40. The computingsystem 1200 generally includes a processing system 1206, storage system1204, software 1202, communication interface 1208 and a user interface1210. The processing system 1206 loads and executes software 1202 fromthe storage system 1204, including a software application module 1230.When executed by the computing system 1200, software module 1230 directsthe processing system 1206 to operate as described to execute themethods described herein, including execution of the face detectionmodule 19, a face recognition module 55, and a face matching module 40.The software application module 1230 also directs the processing system1206 to store information in the databases described herein, such as theentrance image database 53, the exit image storage location 54, and thestay time database 58. Those data bases 53, 54, and 58 comprise part ofthe storage system 1204.

Although the computing system 1200 as depicted in FIG. 2 includes only afew exemplary software modules in the present example, it should beunderstood that any number of software modules can be included, and thatthe operations described with respect to the three representativemodules could be provided by a single module or by any number ofadditional modules. Similarly, while the description as provided hereinrefers to a computing system 1200 and a processing system 1206, it is tobe recognized that implementations of such systems can be performedusing one or more processors, which may be communicatively connected,and such implementations are considered to be within the scope of thedescription.

The processing system 1206 can comprise a microprocessor and othercircuitry that retrieves and executes software 1202 from storage system1204. Processing system 1206 can be implemented within a singleprocessing device but can also be distributed across multiple processingdevices or sub-systems that cooperate in existing program instructions.Examples of processing system 1206 include general purpose centralprocessing units, applications specific processors, and logic devices,as well as any other type of processing device, combinations ofprocessing devices, or variations thereof.

The storage system 1204 can comprise any storage media readable byprocessing system 1206, and capable of storing software 1202. Thestorage system 1204 can include volatile and non-volatile, removable andnon-removable media implemented in any method or technology for storageof information, such as computer readable instructions, data structures,program modules, or other data. Storage system 1204 can be implementedas a single storage device but may also be implemented across multiplestorage devices or sub-systems. Storage system 1204 can further includeadditional elements, such a controller capable, of communicating withthe processing system 1206.

Examples of storage media include random access memory, read onlymemory, magnetic discs, optical discs, flash memory, virtual memory, andnon-virtual memory, magnetic sets, magnetic tape, magnetic disc storageor other magnetic storage devices, or any other medium which can be usedto storage the desired information and that may be accessed by aninstruction execution system, as well as any combination or variationthereof, or any other type of storage medium. In some implementations,the storage media can be a non-transitory storage media. In someimplementations, at least a portion of the storage media may betransitory. It should be understood that in no case is the storage mediaa propagated signal.

User interface 1210 can include a mouse, a keyboard, a voice inputdevice, a touch input device for receiving a gesture from a user, amotion input device for detecting non-touch gestures and other motionsby a user, and other comparable input devices and associated processingelements capable of receiving user input from a user. Output devicessuch as a video display or graphical display can display an interfacefurther associated with embodiments of the system and method asdisclosed herein. Speakers, printers, haptic devices and other types ofoutput devices may also be included in the user interface 1210.

As described in further detail herein, the computing system 1200receives image data from the first and second cameras 4 and 6 in eachstore 2. The image data may be in any format. In some embodiments ofsystem, such as that depicted in FIG. 1, the image data may be orinclude data generated by an image processing module, such as a persondetector, face detector, or face recognition module, i.e., a facialfeature descriptor (represented by a vector of numbers). The image fileformat may exemplarily be in .jpg or .png format.

The user interface 1210 may include a display or other means ofoutputting information, such as analytics output 80 to a user. As isfurther described herein, the analytics output may include any displayformat or means of displaying data, such as stay time data andstatistical or analytical information derived therefrom.

FIG. 3 represents one exemplary method of determining the amount of timespent in a specified area by an individual. Beginning at an entrancelocation 14, an image is recorded at step 81, such as a video recordedimage. Each image is time stamped with a time of recording, and videoimages are continually time stamped. At step 82, the recorded images areprocessed with a face detection algorithm. If a face is detected, anentrance image is created at step 83. As described above, the entranceimage may be created based on the detected face, and may be comprised ofonly the detected facial area, or may comprise any part of the imagesurrounding the detected face. Once the entrance image is created, itmay be stored in an entrance image database at step 84.

Likewise, at an exit location 16 an image is recorded and time stampedat step 91. The image is processed using a face detection algorithm atstep 92. If a face is detected, an exit image is created based on thatface at step 93. In the depicted embodiment, the exit image is thenstored in a temporary storage location at step 94. Next, the exit imageis processed using a facial recognition algorithm at step 100, as areentrance images in the entrance image database. The exit image iscompared to each of entrance images at step 101 until a match isdetermined—i.e., whether the exit image contains a facial match with anyentrance image in the entrance image database. If a match is foundbetween the exit image and an entrance image in the entrance imagedatabase, the matched images are passed to step 102 where stayinformation is determined. If no match is located, then the exit imagemay be deleted from the temporary storage location at step 108. In otherembodiments, however, the unmatched exit image may be transferred andretained in a permanent storage location for use in future matching oranalytics processes as may be described herein.

While unmatched exit images may be deleted at step 108, unmatchedentrance images may also be also removed from the available entranceimages in the entrance image database. At step 110, the entrance imagesin the entrance image database may be examined to determine whether anyentrance image is too old to be a viable match. For example, at step110, each entrance image in the entrance image database may be examinedto determine whether any entrance image was taken prior to a specifiedtime—i.e., whether the time stamp associated with the entrance imageindicates that the image is older than a predefined period. For example,entrance images may be identified that are more than three hours old. Inmany applications, images that are more than three hours old areunlikely to produce a match because, for example in a store application,an individual is unlikely to spend more than three hours in a particularstore. The old images identified at step 110 may be removed from theentrance image database at step 111. The removal of the old entranceimages increases the speed and efficiency of the system because itreduces the number of entrance images that the facial recognition andmatch algorithms need to search. Furthermore, removal of the oldentrance images can increase the accuracy of the system by removingunlikely candidates and thereby reducing the chances of a mismatch. Insome embodiments, an entrance image may be removed from the database ofimages searched by the facial recognition algorithm, but the entranceimage may be maintained in some form or location, either in the entranceimage database or elsewhere.

In other embodiments, all entrance and exit images, whether matched orunmatched, may be maintained longer term in a particular database. Thatdatabase can then be used in the future to match future entrance imagesand/or exit images taken in a particular location for a particular typeof store. In such an embodiment, the stored entrance and exit images canbe used to detect patterns of individuals frequenting a specified area,such as shopping frequency patterns of an individual to a particularstore, or a chain of stores. For example, an entrance image can becompared to a database of images that have been stored long-term, usinga facial recognition algorithm to determine whether the entrance imagematches any entrance or exit image from a previous date. If a match isdetermined, then the dates and times of the entrance images can becompared to determine the frequency at which that individual has visitedthe specified area. Such information can be useful to determine, forexample, the frequency or pattern at which a customer visits aparticular store. Likewise, data regarding shopping frequency patternsof individuals can be used in analytics modules as described herein,such as determining average shopping frequency and patterns.

Regarding step 102, stay information is determined based on the timestamp associated with each of the exit image and the entrance image.Stay information may include the exact time that the individual enteredand exited the store, as well as the duration of stay. The stayinformation is then stored in a database at step 103, such as a staytime database 58. In some embodiments, the stay information may also bestored along with the entrance image and/or the exit image containingthe facial feature descriptor and/or the original image data from thecamera. At step 107, the matched entrance image may be removed from theentrance image database and the matched exit image may be removed fromits temporary storage location. As described above, such removalcontributes to the efficiency and accuracy of the facial recognition andmatching processes. However, as also described above, the images may besimply be removed from the images searched by the face recognitionand/or match algorithms for calculating stay time, but may be otherwiseretained for later matching and/or analytics processes.

At step 104, analytics are performed on the stay information in thedatabase, or some portion thereof. For example, an average stay time maybe determined for all entrance and exit images occurring within aspecified period. For example, an average stay time may be determinedbased on individuals exiting the store between 9:00 and 10:00, 10:00 and11:00, 11:00 and 12:00, etc. Equally, the average stay times can becalculated and associated with the entrance times, rather than the exittimes. Such information can be useful for determining traffic andaverage shopping habits of individuals throughout a particular day,week, month, etc.

Analytics performed at step 104 are output at step 105. For example, theaverage stay time for a particular day can be output as a plot ofaverage stay duration in minutes vs. time of day, such as the graphshown in FIG. 4. FIG. 4 demonstrates an exemplary plot of average stayduration in minutes over a period of 8 AM to 8 PM. The average stayduration in the exemplary plot is calculated every thirty minutes, forexample, based on the entrance or exit time of the matched exit image.Thus, for example, the stay time associated with the matched exit imageshaving an exit time stamp between 8:00 and 8:30 were averaged to createthe data point at 8:30. The same process is repeated for the stay timesfor exit images between 8:30 and 9:00, and so on. Alternatively, theaverages can be determined based on the entrance time of the matchedimages, and the plots can be displayed according to entrance times. Insuch an embodiment, all matched image pairs having an entrance timebetween 8:00 and 8:30 can be grouped together and the stay timesaveraged to create the data point at 8:30. Graphical representationssuch as the exemplary FIG. 4 can provide useful information to storeowners, for example, regarding the times of day at which customers spendlonger periods of time in the store. Such information can help a companyaccurately plan its staffing to accommodate such customer flow. Otherrelated analytic plots may include graphs displaying average stay timesaveraged over a period of a week, or month and displayed on a yearlongtrend, may also be useful. For example, such a plot may be useful forshowing traffic during particular times of year, such as holidays, orspecific seasons. Likewise, graphs displaying the mode or median staytimes over specified periods may also be generated.

Other types of plots are contemplated, including a scatter plotcontaining the stay duration for each matched exit image over the courseof a predefined time period, such as a day, a week, or a month. Such ascatter plot can also be useful for showing trends; but, unlike theaverage plot such as FIG. 4, the scatter plot could also show outlierinformation. In other words, a scatter plot of all stay durations forall matched exit images will show the extremely short stay periods andthe extremely long stay periods, which may provide additional usefulinformation.

In one embodiment, average stay time and other stay time analytics maybe used to determine flow of traffic through a store. For example,average stay time may be used to estimate the time that a particularentering individual may progress to the checkout location of a store.For example, if the average stay time for individuals in a store at 9:30AM is twenty minutes, that average can be used to estimate when anindividual entering the store at 9:30 may arrive at the checkoutcounter. In an exemplary embodiment, the average stay time can be usedto estimate the time that the entering individual will reach thecheckout line by adding the average stay time to the entrance time andsubtracting the amount of time that it takes for an individual to passthrough the checkout line. For example, if a typical checkout process,including waiting in line and paying for purchased items, takesapproximately five minutes, five minutes would be subtracted from theaverage stay time, and that number would be added to the entrance timeto produce the estimated checkout time. The estimation of checkout timecan be useful for managing store personnel, especially for determininghow much personnel to allocate to checkout. Such prediction would allowa store to determine in advance how to staff its checkout locations.

in another embodiment, checkout time estimation can be enhanced by usinga monitoring system to determine the actual current duration of thecheckout process. For example the stay time monitor system 1 disclosedin the present application may also be used inside a store to determinecurrent time spent in a checkout process. For example, the presentlydisclosed system could be used to determine when an individual enters aline and when the individual exits the checkout location, and a matchcan be made to determine the amount of time that the individual spent inthe checkout process. That data can be used by the above-describedanalytics application to assist in determining an estimated checkouttime for an entering individual. In other words, the informationregarding the current average time spent in the checkout process can besubtracted from the average stay time to determine the estimated timethat the individual will enter the checkout process. In still anotherembodiment, the entrance traffic can also inform the checkout timeestimation calculation. For example, the entrance traffic numbers can becompared to those of an earlier time, or an earlier date to determinewhether the calculated average time in the checkout process needs to beadjusted up or down.

Multiple stay time monitoring systems 1 may be utilized in tandem forother purposes as well. For example, time monitoring systems 1 may beimplemented throughout sections of a specified area, such as a store, todetermine a flow pattern of an individual in that specified area. Insuch an embodiment, additional cameras can be placed throughout an area,and the images from those cameras can be compared to the entrance imagesfrom the first camera to find matches, as well as the images taken bythe other cameras inside the specified area. The matched images can thenindicate a pattern of where that individual visited during the stay inthe specified area. In still another embodiment, time monitoring systems1 can be nested inside one another, such as in the checkout time monitorapplication described above. In such an embodiment, images from thefirst camera of the internal system would be compared to the image fromthe first camera at the entrance location of the store, for example, andalso to the exit images of the internal system. In such an embodiment,it is possible to not only determine a flow pattern of an individual,but how long that individual spent in a specified subsection an area,such as a store.

This written description uses examples to disclose the invention,including the best mode, and also to enable any person skilled in theart to make and use the invention. The patentable scope of the inventionis defined by the claims, and may include other examples that occur tothose skilled in the art. Such other examples are intended to be withinthe scope of the claims if they have structural elements that do notdiffer from the literal language of the claims, or if they includeequivalent structural elements with insubstantial differences from theliteral languages of the claims.

What is claimed is:
 1. A method of monitoring the amount of time spentin a specified area by an individual, the method comprising: receiving aplurality of entrance images, each entrance image containing a face ofan entering individual that passes a first location; storing eachentrance image in a database along with a corresponding entrance timethat the entering individual passes the entrance location; receiving anexit image containing a face of an exiting individual that passes asecond location; storing the exit image along with a corresponding exittime that the exiting individual passes the exit location; comparing theexit image to the entrance images in the database; identifying amatching entrance image containing the same face as the exit image; anddetermining a stay time for the exiting individual by determining thedifference between the entrance time corresponding to the matchingentrance image and the exit time.
 2. The method of claim 1, furtherincluding a first step of employing a first camera to automaticallyrecord an image of a first location; and wherein the step of creatingthe one or more entrance images includes: processing the image of thefirst location with a face detection algorithm to detect a face;determining a facial feature descriptor for the detected face using afacial recognition algorithm; and generating the entrance image toinclude the facial feature descriptor.
 3. The method of claim 1, furtherincluding a first step of employing a first camera to automaticallyrecord an image of a second location; and wherein the step of creatingthe one or more exit images includes: processing the image of the secondlocation with a face detection algorithm to detect a face; determining afacial feature descriptor for the detected face using a facialrecognition algorithm; and generating the exit image to include thefacial feature descriptor.
 4. The method of claim 1, further a firststep of employing a first camera to automatically record an image of afirst location; and wherein the step of creating the one or moreentrance images includes: processing the image of the first locationwith a person detection algorithm to detect a person; using the persondetection algorithm to identify a head area of the detected person inthe image of the first location; generating an entrance image based onthe head area of the detected person.
 5. The method of claim 4, furtherincluding using a facial feature extractor algorithm to determine afacial feature descriptor for the detected person.
 6. The method ofclaim 1, further comprising determining stay times of multiple exitingindividuals over a predefined time period.
 7. The method of claim 6,further comprising averaging the stay times within the predefined timeperiod to create an average stay time for the predefined time period. 8.The method of claim 7, further comprising creating a graphical depictionof average stay time over time.
 9. The method of claim 1, wherein thestep of identifying the matching entrance image includes locating anentrance image in the database, if any, that meets at least a predefinedcommonality threshold with the exit image.
 10. A system for monitoringtime spent in a location by an individual, the system comprising: afirst camera positioned to record images of individuals passing a firstlocation; a first image processing module configured to: process therecorded images from the first camera using a face detection algorithmto detect faces within the recorded image; create an entrance image ofeach detected face; and determine an entrance time for each entranceimage, wherein the entrance time is the time that the individual in theentrance image passed the first location; a database configured toreceive and store each entrance image and the corresponding entrancetime; a second camera positioned to record individuals passing a secondlocation; a second image processing module configured to: process therecorded images from the second camera using a face detection algorithmto detect faces within the recorded image; create an exit image of eachdetected face; and determine an exit time for each exit image, whereinthe exit time is the time that the individual in the exit image passedthe second location: an image matching module configured to compare theexit image to the entrance images in the database using a facialrecognition algorithm to identify a matching entrance image containingthe same face as the exit image; and a stay time calculator moduleconfigured to calculate a stay time for the exiting individual bydetermining the difference between the entrance time corresponding tothe matching entrance image and the exit time.
 11. The system of claim10, wherein the first camera is positioned to record individualsentering a store and the second camera is positioned to recordindividuals exiting the store; and wherein the stay time for the exitingindividual is the time that the exiting individual spent in the store.12. The system of claim 10, having a centralized image processing modulethat receives data from both the first camera and the second camera,wherein the first image processing module and the second imageprocessing module are encompassed in the centralized image processingmodule.
 13. The system of claim 10, wherein unmatched entrance imagesare removed from the database of entrance images after a predefinedperiod of time.
 14. A method of monitoring a time-in-store for anindividual, the method comprising: recording an image of an entrancelocation with a first camera; recording an entrance time associated withthe image of the entrance location; detecting one or more faces in theimage of the entrance location using a face detection algorithm;creating an entrance image of the one or more faces detected in theimage of the entrance location; storing the entrance image and theentrance time together in an entrance image database; recording an imageof an exit location with a second camera; recording an exit timeassociated with the image of the exit location; and detecting one ormore faces in the image of the exit location using the face detectionalgorithm; creating an exit image of the one or more faces detected inthe image of the exit location; storing the exit image and the exit timetogether; comparing the exit image to images in the entrance imagedatabase using a facial recognition algorithm; detecting a matchingentrance image, wherein the matching entrance image contains a facialmatch to the exit image; calculating a stay time by determining thedifference between the exit time and the entrance time associated withthe matching entrance image.
 15. The method of claim 14, whereinrecording an image of an entrance location includes continuouslyrecording video images of the first location; and recording an image ofan exit location includes continuously recording video images of thesecond location.
 16. The method of claim 15, further includingprocessing the video images of the first location or the second locationto detect changes; and wherein the detecting one or more faces in theimage of the entrance location includes processing the video images ofthe first location with the face detection algorithm after detecting achange in the images of the first location, and the detecting one ormore faces in the image of the exit location includes processing thevideo images of the second location with the face detection algorithmafter detecting a change in the images of the second location.
 17. Themethod of claim 15, wherein the detecting one or more faces in the imageof the entrance location includes continuously processing the videoimages of the first location and the second location using the facedetection algorithm.
 18. The method of claim 14, further comprising:identifying unmatched entrance images in the entrance image database;and removing unmatched entrance images from the entrance image databasethat have entrance times before a predefined time period.
 19. The methodof claim 14, further comprising calculating stay times for multiplematched entrance and exit images over a predefined time period andaveraging the stay times within the predefined time period to create anaverage stay time for the predefined time period.
 20. The method ofclaim 19, further comprising calculating an estimated arrival time at acheck-out location for an individual passing an entrance location basedon the average stay time.